package cn.com.surker.material.entity;

import cn.com.surker.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;

/**
 * <p>
 * 材料盘存表
 * </p>
 *
 * @author admin
 * @since 2024-12-05
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class MainMaterialInventoryDetail extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 标识
     */
    @TableId(value = "id", type = IdType.AUTO)
    @NotNull(message = "标识不能为空！", groups = {UpdateStatusGroup.class, UpdateGroup.class})
    private Long id;

    /**
     * 公司ID
     */
    @NotNull(message = "公司标识不能为空！", groups = {AddGroup.class, UpdateGroup.class})
    private Long orgId;

    /**
     * 公司
     */
    private String orgName;

    /**
     * 生成时间
     */
    @NotNull(message = "请选择统计月份", groups = {AddGroup.class, UpdateGroup.class})
    private String today;

    /**
     * 材料ID
     */
    @NotNull(message = "请选择过磅材料", groups = {AddGroup.class, UpdateGroup.class})
    private Long materialId;

    /**
     * 仓位ID
     */
    @NotNull(message = "请选择仓位", groups = {AddGroup.class, UpdateGroup.class})
    private Long storageId;

    /**
     * 材料名称
     */
    private String nameNorms;

    /**
     * 仓位类型(0:筒仓1:堆场)
     */
    private Integer storeType;

    /**
     * 筒仓高度
     */
    private Double barrelHeight;

    /**
     * 筒仓半径
     */
    private Double barrelRadius;

    /**
     * 筒仓圆锥
     */
    private Double barrelCone;

    /**
     * 筒仓体积
     */
    private Double barrelVolume;

    /**
     * 堆场长度
     */
    private Double enjoyLength;

    /**
     * 堆场宽度
     */
    private Double enjoyWidth;

    /**
     * 堆场高度
     */
    private Double enjoyHeight;

    /**
     * 堆场体积
     */
    private Double enjoyVolume;

    /**
     * 其他体积
     */
    private Double otherVolume;

    /**
     * 总体积
     */
    private Double sumVolume;

    /**
     * 系数
     */
    private Double ratio;

    /**
     * 重量
     */
    private Double weight;

    /**
     * 审核重量
     */
    private Double checkWeight;

    /**
     * 仓位描述
     */
    private String storageDesc;

    /**
     * 报表开始时间
     */
    private String startTime;
    /**
     * 报表结束时间
     */
    private String endTime;

    /**
     * 材料审核(0:未审核，1：已审核)
     */
    private Integer isCheck;

    /**
     * 审核人
     */
    private String checker;

    /**
     * 审核时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date checkTime;

    /**
     * 财务审核(0:未审核，1：已审核)
     */
    private Integer isFinance;

    /**
     * 财务审核人
     */
    private String finance;

    /**
     * 财务审核时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date financeTime;

    @TableField(exist = false)
    private Integer isCloud;

    public MainMaterialInventoryDetail(){}

    public MainMaterialInventoryDetail(Long orgId, String orgName, String today, Long materialId, Long storageId,
            String nameNorms, Integer storeType, Double tHeight, Double tRadius, Double tCone, Double tVolume,
            Double dLength, Double dWidth, Double dHeight, Double dVolume, Double otherVolume, Double sumVolume,
            Double ratio, Double weight, Double checkWeight, String storageDesc, String startTime, String endTime,
            Integer isCheck, Integer isFinance) {
        this.orgId = orgId;
        this.orgName = orgName;
        this.today = today;
        this.materialId = materialId;
        this.storageId = storageId;
        this.nameNorms = nameNorms;
        this.storeType = storeType;
        this.barrelHeight = tHeight;
        this.barrelRadius = tRadius;
        this.barrelCone = tCone;
        this.barrelVolume = tVolume;
        this.enjoyLength = dLength;
        this.enjoyWidth = dWidth;
        this.enjoyHeight = dHeight;
        this.enjoyVolume = dVolume;
        this.otherVolume = otherVolume;
        this.sumVolume = sumVolume;
        this.ratio = ratio;
        this.weight = weight;
        this.checkWeight = checkWeight;
        this.storageDesc = storageDesc;
        this.startTime = startTime;
        this.endTime = endTime;
        this.isCheck = isCheck;
        this.isFinance = isFinance;
    }
}
